package MAgentAssignment.utils;

import MAgentAssignment.ontology.concepts.Airline;
import MAgentAssignment.ontology.concepts.Airport;
import MAgentAssignment.ontology.concepts.Flight;

import java.util.Random;
import java.util.Vector;

/**
 * Created by IntelliJ IDEA.
 * User: prageeth
 * Date: 2/17/12
 * Time: 5:20 PM
 * To change this template use File | Settings | File Templates.
 */
public class FlightGenerator
{
    public Vector<Flight> getFlights( int flightCount, Vector<Airport> airports, Airline airline )
    {
        Vector<Flight> flights = new Vector<Flight>();

        Random random = new Random();
        for( Airport airport : airports )
        {

            int index = 0;
            do
            {
                index = random.nextInt( airports.size() );
            } while( index == airports.indexOf( airport ) );
            Airport fromAirport = airports.get(index);
            Flight flight = new Flight( airline.getAirLineCode() + "" );
        }
        return flights;
    }
}
